#!/bin/sh

appprefix=qin

echo "Redeploy Nginx"

cp ./nginx_config/*.conf /etc/nginx/conf.d/
nginx -s reload

echo "Redeploy Daemon Service"
# this shell is only for jenkins deploy

find /etc/systemd/system/$appprefix-*.service -exec systemctl disable {} \;

rm /etc/systemd/system/$appprefix-*.service

cp ./daemon_config/*.service /etc/systemd/system/

find /etc/systemd/system/$appprefix-*.service -exec systemctl enable {} \;

